package com.yami.shop.platform.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yami.shop.bean.model.BusinessNft;
import com.yami.shop.common.response.ServerResponseEntity;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.service.BusinessNftService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springdoc.api.annotations.ParameterObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("adminBusinessNftController")
@RequestMapping("/platform/businessNft")
@Tag(name = "取币业务表")
@Slf4j
public class BusinessNftController {

    @Autowired
    private BusinessNftService businessNftService;

    @GetMapping("/page")
    @Operation(summary = "分页获取取币业务列表信息", description = "分页获取取币业务列表信息")
    public ServerResponseEntity<IPage<BusinessNft>> page(@ParameterObject BusinessNft businessNft, PageParam<BusinessNft> page) {
        IPage<BusinessNft> userDropPage = businessNftService.getBusinessNftPage(page, businessNft);
        return ServerResponseEntity.success(userDropPage);
    }
}
